#include "myHero.h"

USING_NS_CC;

myHero::myHero(void)
{
}


myHero::~myHero(void)
{
}

bool myHero::init()
{
	if (!Sprite::init())
	{
		return false;
	}

	Size size=Size(35,45);

	this->runAction(RepeatForever::create(FlashTool::readJsonSpriteSheet("Hero.json",0.25f)));
	this->setPhysicsBody(PhysicsBody::createBox(size));
	//this->setPositionX(Director::getInstance()->getVisibleSize().width/10);
	this->setContentSize(size);

	this->getPhysicsBody()->setRotationEnable(false);
	this->getPhysicsBody()->setContactTestBitmask(1);

	return true;
}


